package com.cf.proxy.model;

import com.cf.code.core.CField;
import com.cf.code.core.CModel;
import com.cf.code.core.CPage;
import com.cf.crud.entity.BaseEntity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.util.Date;

/**
 * boot-awm-Proxy
 *
 * @author <a href="2428922347@qq.com">Zhu mingming</a>
 * @info
 * @since 2018/7/11 上午 10:42
 */
@Entity
@Table(name = "proxy")
@CModel(pages = {
        @CPage(title = "代理列表", path = "proxy", templateName = "list.ftl", outPutName = "list.ftl"),
        @CPage(title = "代理", path = "proxy", templateName = "add.ftl", outPutName = "add.ftl"),
        @CPage(title = "代理", path = "proxy", templateName = "update.ftl", outPutName = "update.ftl")
})
public class Proxy extends BaseEntity {

    @CField(lab = "代理ip")
    private String ip;

    @CField(lab = "代理端口")
    private int port;

    @CField(lab = "代理测试时间")
    @Column(name = "testTime")
    private Date testTime;


    @CField(lab = "代理添加时间")
    @Column(name = "addTime")
    private Date addTime = new Date();

    public Date getTestTime() {
        return testTime;
    }

    public void setTestTime(Date testTime) {
        this.testTime = testTime;
    }

    public Date getAddTime() {
        return addTime;
    }

    public void setAddTime(Date addTime) {
        this.addTime = addTime;
    }

    public String getIp() {
        return ip;
    }

    public void setIp(String ip) {
        this.ip = ip;
    }

    public int getPort() {
        return port;
    }

    public void setPort(int port) {
        this.port = port;
    }
}
